package com.metaverse.backend.domain;

import com.metaverse.backend.annotations.ExcelTitle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.time.LocalDateTime;

/**
 * 礼物数据
 */
@Data
@Entity
@Table(indexes = {
        @Index(columnList = "roomId"),
        @Index(columnList = "msg_type"),
})
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ExcelTitle("刷礼物数据")
@ApiModel("刷礼物数据")
public class LiveGift extends BaseEntity{
    @ApiModelProperty("房间ID")
    private String roomId;//":1649068964, //  房间ID
    @ApiModelProperty("局号")
    private String roundId;

    @ApiModelProperty("日志类型")
    private String msg_type;//":1649068964, //  日志类型

    @ApiModelProperty("类型id")
    private String msg_id;//: "123456782",  // string类型id
    @ApiModelProperty("用户的加密openid，当前其实没有加密")
    private String sec_openid;//:"xxxx",    // 用户的加密openid，当前其实没有加密
    @ApiModelProperty("加密的礼物id")
    private String sec_gift_id;//: "xxxx",  // 加密的礼物id
    @ApiModelProperty("送出的礼物数量")
    private Integer gift_num;// 123,        // 送出的礼物数量
    @ApiModelProperty("礼物总价值，单位分")
    private Integer gift_value;// 10000,    // 礼物总价值，单位分
    @ApiModelProperty("用户头像")
    private String avatar_url;//:"xxx",     // 用户头像
    @ApiModelProperty("用户昵称(不加密)")
    private String nickname;//:"xxxx",      // 用户昵称(不加密)
    @ApiModelProperty("礼物毫秒级时间戳")
    private Long timestamp;//1649068964, // 礼物毫秒级时间戳

    @ApiModelProperty("发生时间")
    private LocalDateTime happenTime;
}
